1. Field of the Invention
The present invention relates to a rotary sensor and, particularly to a rotary sensor capable of detecting a rotation angle transmitted from a shaft to be detected with high accuracy.
2. Description of the Related Art
As shown in FIG. 7, a prior art rotary sensor comprises a substantially cylindrical housing 1, a case 2 having a cavity portion 2a therein, and a cover 3 for closing the cavity portion 2a by fixing this case 2 thereto.
A shaft hole 3a is formed in the cover 3, and a rotation body 4 having a shaft portion 4a at the center of rotation is stored in the cavity portion 2a. The shaft portion 4a is rotably inserted into the shaft hole 3a of the cover 3 and projects outward from the cover 3.
The diameter of the above shaft hole 3a is made slightly larger than the diameter of the shaft portion 4a and the shaft portion 4a is inserted into and mated with the shaft hole 3a. 
An oval engagement hole 4a, for example, is formed in the end portion of the shaft portion 4a at the center of rotation and an operation shaft 8 which will be described hereinafter is inserted into this engagement hole 4b. 
A resistor substrate 5 is installed on the cavity portion 2a side of the cover 3, and an unshown substantially U-shaped resistor pattern is formed on the surface of the resistor substrate 5 by printing. Sliding pieces 6 provided on the rotation body 4 are elastically brought into contact with the resistor pattern and slide over the resistor pattern when the rotation body 4 turns so that the resistance value changes with a predetermined curve.
A plurality of terminals 7 connected to the above resistor pattern are attached to a lower side in the figure of the above resistor substrate 5 by caulking or the like.
To detect the rotation angle of, for example, the throttle valve of a car using this prior art rotary sensor, the cover 3 is attached to a predetermined attachment member (not shown), and the operation shaft 8 which is a shaft to be detected shown by a two-dotted chain line and connected to the throttle valve of the car is press fitted in the engagement hole 4b of the shaft potion 4a. 
The end portion of this operation shaft 8 is shaved oval and this oval end portion is engaged with the oval engagement hole 4b of the shaft portion 4a to transmit the rotation of the operation shaft 8 to the rotation body 4.
As the above operation shaft 8 is displaced or decentered in a thrust direction which is an axial direction and a radial direction perpendicular to the axial direction during the assembly of the parts of the throttle valve, the rotary sensor must absorb the displacement or decentering of the operation shaft 8.
The absorption of the displacement or decentering of the operation shaft 8 is carried out by making the diameter of the shaft hole 3a in the cover 3 larger than the diameter of the shaft portion 4a of the rotation body 4 so that even when the operation shaft 8 is displaced or decentered in a radial direction, the shaft portion 4a can turn the rotation body 4 smoothly without contact between the shaft portion 4a and the shaft hole 3a. 
The above-mentioned prior art rotary sensor can detect the rotation angle of the operation shaft 8 because when the operation shaft 8 connected to the rotary shaft of a throttle valve or the like turns at a predetermined angle, the rotation body 4 turns smoothly, the sliding pieces 6 slide over the resistor pattern to change the resistance value, and an unshown control portion detects this change in resistance value.
However, as the above-mentioned prior art rotary sensor involves such a problem that, when the operation shaft 8 turns, the rotation body 4 is displaced or decentered by the displacement or decentering of the operation shaft 8, and the sliding pieces are shifted from the track of the resistor pattern with the result of large fluctuations in resistance value because the shaft portion 4a of the rotation body 4 is directly attached to the operation shaft 8 which is displaced or decentered in a thrust direction or radial direction. As a result, the rotation angle cannot be detected with high accuracy.
As means of eliminating the influence of the displacement of the operation shaft 8, there is a method in which the operation shaft 8 and the shaft portion 4a are in contact with each other on only one plane in a rotation direction to transmit only the rotation in one direction of the operation shaft 8 to the rotation body 4, and the rotation body 4 is turned along with the rotation of the operation shaft 8 by the spring pressure of a return spring or the like when the operation shaft 8 turns in another direction so that the operation shaft 8 and the shaft portion 4a turn together. However, this method requires such a part as a return spring or the like, thereby increasing the number of parts and boosting costs.
It is an object of the present invention to provide a rotary sensor which solves the above problems and can detect a rotation angle with high accuracy by absorbing the displacement or decentering of the operation shaft 8 even if the operation shaft 8 is displaced or decentered.
According to a first aspect of the present invention, there is provided a rotary sensor comprising a housing, a rotation body which is rotably supported by the housing and has on the front surface an engagement portion for movably guiding a shaft to be detected along a first straight line, a substrate having a conductive pattern and attached to the housing, and contact portions which are provided on the rear surface of the rotation body, are in sliding contact with the conductive pattern and are located at positions in a direction perpendicular to the first straight line. Therefore, since the rotation body does not turn even if the shaft to be detected is displaced or decentered, it is possible to provide a rotary sensor which can minimize the influence of the displacement or decentering of the shaft upon the output of the rotary sensor and can detect the rotation angle or rotation direction of the shaft to be detected with high accuracy.
According to a second aspect of the present invention, there is provided a rotary sensor, wherein a groove into which a flat projection formed at the end of the shaft to be detected is inserted is formed in the rotation body to form the above engagement portion for the operation shaft. Therefore, the engagement portion can be formed with a simple structure.
According to a third aspect of the present invention, there is provided a rotary sensor, wherein the groove is formed by a pair of walls which are opposed to each other with the center of the rotation of the rotary body interposed therebetween. Therefore, the engagement portion can be formed with a simple structure.
According to a fourth aspect of the present invention, there is provided a rotary sensor, wherein a flat projection to be inserted into a groove formed in the end of the shaft to be detected is formed on the rotation body to form the engagement portion for the operation shaft. Therefore, the engagement portion can be formed with a simple structure.
According to a fifth aspect of the present invention, there is provided a rotary sensor, wherein the conductive pattern is formed of ring-shaped resistors. Therefore, even when the positions of sliders are changed in a radial direction, the output rarely changes. Therefore, the rotation angle or rotation direction of the shaft to be detected can be detected with high accuracy.
According to a sixth aspect of the present invention, there is provided a rotary sensor, wherein the conductive pattern is formed of a radiate pattern and the center of the radiate pattern is located at the same position as the center of the rotation of the rotation body. Therefore, even when the positions of the sliders change in a radial direction, the output does not change. Therefore, the rotation angle or rotation direction of the operation shaft can be detected with high accuracy.
The above and other objects and advantages of the present invention will become apparent from the following description when taken into conjunction the accompanying drawings.